/**
*	流程模块：jxccrku的扩展js
*	开发者：雨中磐石
*	地址：www.rockoa.com
*	日期：2023-07-20
*/



js.jxccrku_list = function(){
	
	
	this.initbodys = function(){
		
	}
	
	
	//操作出入库自定义方法
	this.onmenushow = function(d, da){
		if(d.num=='crku'){
			var str = '<div>请选择操作仓库：<select style="width:150px" name="ckid" class="select"><option value="">-请选择仓库-</option></select></div>';
			str += '<div style="padding:10px 0px">出入库日期：<input class="input input-date" onclick="js.changedate(this)" name="dt" style="width:150px" readonly value="'+js.now()+'"></div>';
			this.loadck(da);
			return str;
		}
	}
	
	this.loadck = function(da){
		js.ajax.get({
			url:this.getacturl('ckdata','jxcbase')
		},function(ret){
			var o = jsform('ckid','flowmenuform');
			js.setselectdata(o,ret.data,'id');
			var val = da['ckid_yval'];
			if(val)o.value = val;
		});
	}
	
	this.onmenusavebefore = function(d, da){
		if(d.num=='crku'){
			if(!da.ckid)return '请选择仓库';
			if(!da.dt)return '请选择日期';
		}
	}
	
}